﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Text.RegularExpressions;

namespace ImageEditor
{
    public class State
    {
        public State() { }

        public State(String Symbol, String ActivityLevel) 
        {
            this.Symbol = Symbol;
            this.ActivityLevel = ActivityLevel;
            this.Name = StateList.GetStateName(this.Symbol).Replace(" ", "");
            this.Location = StateList.GenerateStateData()[this.Name];
            this.Color = StateList.GenerateColorKey()[this.ActivityLevel];
            this.StateImage = Image.FromFile(Regex.Split(Application.ExecutablePath, "ImageEditor")[0] 
                                                + "\\ImageEditor\\Images\\" + this.ActivityLevel + "\\" + this.Name.ToLower() + ".gif");
            this.Rectangle = new Rectangle(this.Location, new Size(this.StateImage.Width, this.StateImage.Height));
        }      

        public String Name { set; get; }
        public Point Location { set; get; }
        public Image StateImage { set; get; }
        public String Symbol { set; get; }
        public Color Color { set; get; }
        public String ActivityLevel { set; get; }
        public Rectangle Rectangle { set; get; }
    }
}
